<?php
include("../inc/Function.php");
if($_SESSION['a']['alevel']!=5 && $power['tjsp']!=1){
	echo "<script>alert('权限不足');window.location.href='index.php';</script>";exit;
}
$page = isset($_GET['page'])?$_GET['page']:1;
$psize = 15;
$gname = isset($_GET['gname'])?$_GET['gname']:"";
$cplx = isset($_GET['cplx'])?$_GET['cplx']:0;
$cid = isset($_GET['cid'])?$_GET['cid']:0;
$tag1 = isset($_GET['tag1'])?$_GET['tag1']:0;
$tag2 = isset($_GET['tag2'])?$_GET['tag2']:0;
$type1 = isset($_GET['type1'])?$_GET['type1']:0;
$type2 = isset($_GET['type2'])?$_GET['type2']:0;
$type3 = isset($_GET['type3'])?$_GET['type3']:0;
$taglist1 = taglist(1,1);
$taglist2 = taglist(2,1);
$list = goodslist($page,$psize,$cplx,$cid,$tag1,$tag2,$type1,$type2,$type3,$gname);
$num = goodsnum($cplx,$cid,$tag1,$tag2,$type1,$type2,$type3,$gname);
$page1 = page1($num,$psize,$page,$_SERVER['PHP_SELF']."?cplx=$cplx&cid=$cid&tag1=$tag1&tag2=$tag2&type1=$type1&type2=$type2&type3=$type3&gname=$gname");
if($list){
    $msg = 1;
}else{
    $msg = 0;
}
$tpl->assign('msg',$msg);
$tpl->assign('cpstate',$cpstate);
$tpl->assign('cplx',$cplx);
$tpl->assign('cid',$cid);
$tpl->assign('tag1',$tag1);
$tpl->assign('tag2',$tag2);
$tpl->assign('type1',$type1);
$tpl->assign('type2',$type2);
$tpl->assign('type3',$type3);
$tpl->assign('gname',$gname);
$tpl->assign('glist',$list);
$tpl->assign('page',$page1);
$tpl->assign("catarr",$catarr);
$tpl->assign("jjarr",$jjarr);
$tpl->assign("taglist1",$taglist1);
$tpl->assign("taglist2",$taglist2);
$tpl->show('goodslist');
?>